package com.example.databasediary;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import java.util.Timer;
import java.util.TimerTask;

public class StartActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final View view=View.inflate(this,R.layout.activity_start,null);
        setContentView(R.layout.activity_start);

        /*设置定时器*/
        Timer timer=new Timer();
        TimerTask timerTask=new TimerTask() {
            @Override
            public void run() {
                Intent intent1=new Intent(StartActivity.this,MainActivity.class);
                startActivity(intent1);
                StartActivity.this.finish();
            }
        };
        timer.schedule(timerTask,1500*1);
    }

}
